package com.dayuanit.dy15.ebook.bookshop.redis;

import com.dayuanit.dy15.ebook.bookshop.dto.CommodityHomeDTO;
import com.dayuanit.dy15.ebook.bookshop.dto.NavigationDTO;

import java.util.Collections;
import java.util.List;

public interface RedisService {

    void zadd(String key, int score, String member);

    void zincrby(String key, int number, String member);

    void zrange(String key, int start, int stop);

    List<CommodityHomeDTO> zrevRange(String key, int start, int stop);

    default List<NavigationDTO> queryNav() {
        return Collections.emptyList();
    }

    default void cacheNav(List<NavigationDTO> navs) {

    }

    default List<CommodityHomeDTO> zrevRange(int start, int stop) {
        return null;
    }

    default void addHomeBook(int number, String member) {}
}
